﻿#ifndef __SS_NODE_FACTORY_H__
#define __SS_NODE_FACTORY_H__
#include "ssSingleton.h"
#include "ssNode.h"
#include "../texture/ssTexture2D.h"
#include "../3dMath/ssColor.h"

namespace StarSeeker
{

class ssNodeFactory
{
public:
	ssNodeFactory();
	~ssNodeFactory();

	//摄像机节点
	ssNode* CreateCamera();
	//第三人称摄像机
	ssNode* CreateThirdPersonCamera();
	//坐标轴节点
	ssNode* CreateAxesNode(ssfloat axesLength=100.f);
	//面板节点
	ssNode* CreateBoardNode(ssTexture2D* pTexture, ssfloat width = 128.0f, ssfloat height = 128.0f);
	ssNode* CreateBoardNode(const char* texturePath, ssfloat width = 128.0f, ssfloat height = 128.0f);
	//公告板节点
	ssNode* CreateBillboardNode(ssTexture2D* pTexture, ssfloat width = 128.0f);
	ssNode* CreateBillboardNode(const char* texturePath, ssfloat width = 128.0f);
	//模型节点
	ssNode* CreateModelNode(const char* modelPath);
	//box模型
	ssNode* CreateBoxNode();
	//菱形模型
	ssNode* CreateDiamondNode();
	//纹理模型节点
	ssNode* CreateTextureModelNode(ssTexture2D* pTexture, const char* modelPath);
	ssNode* CreateTextureModelNode(const char* texturePath, const char* modelPath);
	//光照纹理模型节点
	ssNode* CreateLightTextureModelNode(ssTexture2D* pTexture, const char* modelPath);
	ssNode* CreateLightTextureModelNode(const char* texturePath, const char* modelPath);
	//像素光照纹理模型节点
	ssNode* CreatePixelLightTextureModelNode(ssTexture2D* pTexture, const char* modelPath);
	ssNode* CreatePixelLightTextureModelNode(const char* texturePath, const char* normalTexturePath, const char* modelPath);
	//线段节点
	ssNode* CreateLineNode(ssfloat x1, ssfloat y1, ssfloat z1, ssfloat x2, ssfloat y2, ssfloat z2, ssfloat r, ssfloat g, ssfloat b, ssfloat a);
	ssNode* CreateLineNode(ssVector3 p1, ssVector3 p2, ssColor4 c);
	//地形1.0
	ssNode* CreateTerrain10Node(ssTexture2D* pTexture);
	ssNode* CreateTerrain10Node(const char* hightPath, const char* texturePath1, const char* texturePath2);
};

#define SS_NODE_FACTORY StarSeeker::ssSingle<StarSeeker::ssNodeFactory>::instance()

}
#endif
